package com.carkeeper.serviceManagement.feign;

import com.carkeeper.common.utils.Result;
import com.carkeeper.serviceManagement.pojo.ServiceType;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @author pengjinxiong
 * @version 1.0
 * @date 2020/11/24 15:44
 */
@FeignClient(name = "service")
public interface ServiceTypeFeign {

    @GetMapping("/serviceType/{id}")
    Result<ServiceType> findById(@PathVariable("id") Long id);


    //查询所有一级分类
    @GetMapping("/serviceType/findLevel1")
    Result<List<ServiceType>> findLevel1();

    //根据一级菜单id查询所有二级菜单
    @GetMapping("/serviceType/findLevel2/{id}")
    Result<List<ServiceType>> findLevel2(@PathVariable("id") Long id);
}
